home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet multimedia
/
Animacje, filmy i prezentacje
/
Odtwarzacze filmow
/
JahPlayer 0.1.0
/
jahplayer-0.1.0-installer.exe
/
openlibraries-0.3.0-runtime.exe
/
shaders
/
histogram.frag
< prev
next >
Wrap
Text File
|
2006-07-29
|
526b
|
25 lines
// fx - A compositing library representation.
// Copyright (C) 2005-2006 Visual Media FX Ltd.
// Released under the LGPL.
// For more information, see http://www.openlibraries.org.
uniform sampler2D inColor0;
uniform float min;
uniform float max;
uniform vec4 channels;
varying vec2 v_tex;
void main( void )
{
vec4 color = texture2D( inColor0, v_tex );
float level = clamp( dot( channels, color ), 0.0, 1.0 ) * color.a;
if( level < min || level >= max )
discard;
gl_FragColor = color;
}